<template>
  <div>
    <div class="pencer_header">
        <div class="pencer_header_t">
            <div class="pencer_header_t_l">
                <div class="pencer_header_t_userpic">
                    <router-link to='myinfo'>
                        <div class="pencer_header_t_userpic">
                            <!-- <div><img src="@/assets/images/userheader.png"></div> -->
                            <div v-if="member_info.picurl == ''"><img src='./../../assets/images/userheader.png'></div>
                            <div v-else><img :src="member_info.picurl"></div>
                        </div>
                    </router-link>
                </div>
            </div>
            <div class="pencer_header_t_r">
                <p>{{member_info.nickname}} <span><img src="./../../assets/images/yrlogo.png"></span></p>
                <span class="pencer_header_t_r_title">您的满意是我们前进的动力</span>
            </div>
        </div>
        <div class="pencer_header_b">   
            <div class="pc_integral">
                <router-link to="/balance" style="color:#333">
                    <span>￥{{amount_info.amount}}</span>
                    <p>余额</p>
                </router-link>
            </div>
            <div class="pc_integral">
                <router-link to="/ryicon" style="color:#333">
                    <span>{{amount_info.amount_coin}}</span>
                    <p>瑞雅币</p>
                </router-link>
            </div>
            <div>
                <router-link to="/integral" style="color:#333">
                    <span>{{member_info.score}}</span>
                    <p>积分</p>
                </router-link>
            </div>
            
            <div class="pc_recharge_btn">
                <router-link to='/recharge'>
                    <button>充值<img src="./../../assets/images/go_white.png" width="15"></button>
                </router-link>
            </div>
            
        </div>
    </div>
    <section class="aui-grid mine_orders">
        <div class="pc_list_order" @click="Openorders('all')">
            <div class="pc_list_order_l_icon"><img src="@/assets/images/orders_icon.png" width="60%"></div><span class="pc_list_order_l" style="font-size: 14px">全部订单</span>
            <span style="float:right;" class="more_orders"><img src="@/assets/images/go.png" width="10%"></span>
        </div>
        <div class="aui-row">
           <!--  <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders('')">
                <div class="aui-badge" v-if="ordernumber>0">{{ordernumber}}</div>
                <i><img src="@/assets/images/true_icon.png" width="23"  style="display:inline"></i>
                <div class="aui-grid-label">全部</div>
            </div> -->
            <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders('yuyueing')">
                <div class="aui-badge" v-if="datalist.yuyueing_count>0">{{datalist.yuyueing_count}}</div>
                <i><img src="@/assets/images/clock_icon.png" width="23"  style="display:inline"></i>
                <div class="aui-grid-label">预约中</div>
            </div>
            <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders('unpay')">
                <div class="aui-badge" v-if="datalist.unpay_count>0">{{datalist.unpay_count}}</div>
                <i><img src="@/assets/images/wallet_icon.png" width="23"  style="display:inline"></i>
                <div class="aui-grid-label">待付款</div>
            </div>
            <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders('serviceing')">
                <div class="aui-badge" v-if="datalist.serviceing_count>0">{{datalist.serviceing_count}}</div>
                <i><img src="@/assets/images/eamilpost.png" width="23"  style="display:inline"></i>
                <div class="aui-grid-label">服务中</div>
            </div>
           <!--  <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders(4)">
                <i><img src="@/assets/images/true_icon.png" width="20"  style="display:inline"></i>
                <div class="aui-grid-label">已完结</div>
            </div> -->
            <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders('uncomment')">
                <div class="aui-badge" v-if="datalist.uncomment_count>0">{{datalist.uncomment_count}}</div>
                <i><img src="@/assets/images/message_icon.png" width="23"  style="display:inline"></i>
                <div class="aui-grid-label">待评价</div>
            </div>
             <div class="aui-col-xs-2 mine_orders_icon" @click="Openorders('cancel')">
                <div class="aui-badge" v-if="datalist.ordernumber>0">{{datalist.ordernumber}}</div>
                <i><img src="@/assets/images/true_icon.png" width="23"  style="display:inline"></i>
                <div class="aui-grid-label">取消/退单</div>
            </div>
        </div>
    </section>
    <div class="devivid"></div>
    <section class="aui-grid mine_orders" style="margin-top:0.5rem;">
        <div class="aui-row mine_a_normal">
            <div class="aui-col-xs-3">
                <router-link to="/recharge" style="color:#333">
                    <i><img src="./../../assets/images/ryicon_icon.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">余额充值</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link :to="{name:'PcShop',query:{title:'商城'}}" style="color:#333">
                    <i><img src="./../../assets/images/cloth_icon.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">积分商城</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link to="/adresses" style="color:#333">
                    <i><img src="./../../assets/images/location_icon.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">常用地址</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link to="/donate" style="color:#333">
                    <i><img src="./../../assets/images/heart_icon_green.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">公益捐赠</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link to="/recommend" style="color:#333">
                    <i><img src="./../../assets/images/excode_yellow.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">我的推广</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link to="/team" style="color:#333">
                    <i><img src="./../../assets/images/people_icon_green.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">我的团队</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link to="/myinfo" style="color:#333">
                    <i><img src="./../../assets/images/book_blue_icon.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">个人资料</div>
                </router-link>
            </div>
            <div class="aui-col-xs-3">
                <router-link to="/more" style="color:#333">
                    <i><img src="./../../assets/images/more_icon_black.png" width="25%" style="display:inline"></i>
                    <div class="aui-grid-label">更多</div>
                </router-link>
            </div>
        </div>
    </section>
    <div class="devivid"></div>
    <div class="tellus_online">
        <div class="tellus_online_l">
            <div class="tellus_online_l_iconbox">
                <img src="./../../assets/images/personwear.jpg" width="10%">
            </div>
            <span>在线客服</span>
        </div>
        <div class="tellus_online_r">
            <div class="tellus_online_l_iconbox">
                <img src="./../../assets/images/tel_icon.jpg" width="10%">
            </div>
            <span>客服电话</span>
        </div>
    </div>
    <div class="devivid"></div>
  </div>
</template>
<script>
import { getInfo } from '@/api/login'
export default{
  name: 'Mine',
  data(){
    return{
        member_info:'',//个人信息
        amount_info:{},//账户信息
        datalist:''//全部信息

    }
  },
  methods:{
      loadInfoMessage(){
          this.$vux.loading.show({ text: 'Loading' })
          getInfo().then(response=>{
              // console.log(JSON.stringify(response)  )
              this.member_info = response.data.member_info
              if(response.data.amount_info!==null){
                this.amount_info = response.data.amount_info
                this.$vux.loading.hide()
              }else{
                this.amount_info.amount='0.00'
                this.amount_info.amount_coin = '0.00'
              }
              this.datalist = response.data
              this.$vux.loading.hide()
          })
      },//获取个人信息
      Openorders(type){
          this.$router.push({
            path:`pcorders/${type}`
          })
      },
  },
  created(){
      this.loadInfoMessage()
  },
 
}
</script>
<style>

</style>


